/*
 * Person.h
 *
 *  Created on: 22/04/2012
 *      Author: alex
 */

#ifndef PERSON_H_
#define PERSON_H_

#include <iostream>
#include <list>
#include "ApplicationCommon.h"
#include "../common/Object.h"

class ElevatorPassenger: public Object
{
public:
    static const int DEFAULT_WEIGHT = 75;
    static const int NO_DESTINATION = -1;
    static const int PASSENGER_WEIGHT_VARIANCE = 50;
    static const int MINIMUM_PASSENGER_WEIGHT = 50;

private:
    FloorIdentifier m_DestinationFloor;
    float m_Weight;
public:
    /**
     *
     */
	ElevatorPassenger(FloorIdentifier destination = NO_DESTINATION,
					float weight=DEFAULT_WEIGHT);

    /**
     *
     */
	ElevatorPassenger(ElevatorPassenger &orig);

	/**
	 *
	 */
	virtual ~ElevatorPassenger();
	/**
	 *
	 */
	float getWeight();

	/**
	 *
	 */
	void setWeight(float weight);

	/**
	 *
	 */
	FloorIdentifier getDestination();

	void setDestination(FloorIdentifier destination);

	/**
	 *
	 */
	void serialize(char *stream);

	/**
	 *
	 */
	void deserialize(char *stream);

	/**
	 *
	 */
	int byteSize();

	std::string toPrettyString();
};

typedef std::list<ElevatorPassenger *>ElevatorPassengerList;

#endif // PERSON_H_
